package com.glhtgyxy.biyesheji.Mapper;


import com.glhtgyxy.biyesheji.Pojo.evaluate;
import com.glhtgyxy.biyesheji.Pojo.merchant;
import com.glhtgyxy.biyesheji.Pojo.user;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;

@Mapper
public interface dlzcMapper {


    @Select("select * from user where useraccount=#{useraccount} and userpassword = #{password}")
    ArrayList<user> dl(String useraccount , String  password);


    @Select("select * from merchant where merchantaccount=#{useraccount} and merchantpassword = #{password}")
    ArrayList<merchant> sjdl(String useraccount , String  password);

    @Insert("insert into user (username,useraccount,userpassword) values (#{useraccount},#{useraccount},#{password})")
    int zc(String useraccount,String password);

    @Insert("insert into merchant (merchantname,merchantaccount,merchantpassword) values (#{useraccount},#{useraccount},#{password})")
    int sjzc(String useraccount,String password);

    @Select("select * from user where id=#{id}")
    user  idfindusername(int id);

    @Select("select * from merchant where id=#{id}")
    merchant  idfindmerchant(int id);

}
